<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div class="mainbar">
	<div class="page-head">
		<h2 class="pull-left">
			<i class="icon-tasks"></i>
			<spring:message code="menu.updateProduct.label" />
		</h2>
		<div class="clearfix"></div>

	</div>
	<div class="matter background_seller">
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="span7 offset2">
					<div class="widget">
						<div class="widget-head">
							<div class="pull-left">
								<spring:message code="menu.productinfo.label" />
							</div>
							<div class="clearfix"></div>
						</div>
						<div class="widget-content">
							<div class="padd">
								<div class="offset1">
									<form:form id="updateProductForm" action="updateProduct"
										method="POST" class="form-horizontal" modelAttribute="product">
										<form:hidden path="id"/>
										<!-- Username -->
										<div class="control-group">
											<label class="control-label admin_Label" for="productname"><spring:message
													code="menu.productname.label" /></label>
											<div class="controls">
												<form:input type="text" class="input-large" name="txtproductname"
													id="productname" path="name"/>
											</div>
										</div>
										<!-- Password -->
										<div class="control-group">
											<label class="control-label admin_Label" for="productprice"><spring:message
													code="menu.productprice.label" /></label>
											<div class="controls">
												<form:input type="number" class="input-large" path="price"
													name="txtproductprice" id="productprice"/> 
											</div>
										</div>
										
											<div class="control-group">
											<label class="control-label admin_Label" for="producthotprice"><spring:message
													code="menu.producthotprice.label" /></label>
											<div class="controls">
												<form:input type="number" class="input-large" path="hotprice"
													name="txtproducthotprice" id="producthotprice"/> 
											</div>
										</div>
										
										<div class="control-group">
											<label class="control-label admin_Label" for="productdesc"><spring:message
													code="menu.productdesc.label" /></label>
											<div class="controls">
												<form:textarea cols="100" rows="10" class="input-large"
													name="txtproductdesc" id="productdesc" path="description"/>
											</div>
										</div>

										<div class="control-group">
											<label class="control-label admin_Label" for="category"><spring:message
													code="menu.categoryname.label" /></label>
											<div class="controls">
												<form:select name="categoryname" id="categoryname" 
													path="categoryId" > 
													<c:forEach items="${categoryListUpdate}" var="cate">
														<form:option value="${cate.id}" >
															<c:out value="${cate.name}" />
														</form:option>
													</c:forEach>
												</form:select>
											</div>
										</div>
										<div class="control-group">
											<label class="control-label admin_Label" for="isActive"><spring:message
													code="menu.isActive.label" /></label>
											<div class="controls">
												<form:checkbox  name="isActive"  path="isActive"/>
											</div>
										</div>

<!-- 										<div class="control-group"> -->
<%-- 											<label class="control-label admin_Label" for="isMainProduct"><spring:message --%>
<%-- 													code="product.main.label" /></label> --%>
<!-- 											<div class="controls"> -->
<%-- 												<form:checkbox  name="isMainProduct"  path="isMainProduct"/> --%>
<!-- 											</div> -->
<!-- 										</div> -->

										<div class="control-group">
											<div class="controls">

												<button type="submit" class="btn btn-primary offset2"
													value="addAccount" name="action">
													<spring:message code="menu.update.label" />
												</button>
												<a href="./listProduct" class="btn btn-primary "
													style="font-size: 12px !important; margin-left: 20px"><spring:message
														code="menu.cancel.label" /></a>
											</div>
										</div>
									</form:form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
